package homework.mid_autumn_festival.string_exercise;

public class ReplaceAllDemo {
    public static void main(String[] args) {
        String str = "abc123def456ghi";
        str = str.replaceAll("[0-9]+","NUMBER");
        System.out.println(str);

        String regex = "(sb|nm)";
        String message = "nm,sb吧";
        message = message.replaceAll(regex,"***");
        System.out.println(message);
    }
}
